<template>
  <div class="sec-main">
    <el-page-header @back="goBack" content="权限资产管理"> </el-page-header>
    <el-tabs type="border-card">
      <el-tab-pane label="资产信息">
        <secAuthBaseInfo :data="data"></secAuthBaseInfo>
      </el-tab-pane>
      <el-tab-pane label="风险列表">
        <secRiskList assetType="UPM"></secRiskList>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import secRiskList from "../propertyManage/components/risklistTable.vue";
import { upmAssetDetailApi } from "api/authApi";
import secAuthBaseInfo from "./components/baseInfo.vue";
export default {
  name: "authDetail",
  props: {},
  mixins: [],
  components: { secAuthBaseInfo, secRiskList },
  data() {
    return {
      data: {},
    };
  },
  computed: {},
  created() {},
  mounted() {
    this.initPage();
  },
  methods: {
    goBack() {
      this.$router.push("/property/auth/list");
    },
    initPage() {
      upmAssetDetailApi({ id: this.$route.query.id }).then((res) => {
        console.log("[ res ] >", res);
        let noticeUsersAccount = res.data.noticeUsers.map((item) => item.account);
        console.log("[ noticeUsersAccount ] >", noticeUsersAccount);
        res.data["noticeUsersAccount"] = noticeUsersAccount;
        this.data = res.data;
        console.log("[ this.data ] >", this.data);
      });
    },
  },
  watch: {},
};
</script>
<style lang="scss" scoped>
//@import url(); 引入公共css类
.edit-box {
  position: relative;
  .icon-box {
    position: absolute;
    right: -70px;
    top: 0px;
    font-size: 20px;
    width: 60px;
    color: $themeColor;
  }
}
</style>
